#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Project: spd-sxmcc
"""
@author: lyndon
@time Created on 2019/2/18 14:44
@desc
"""

from custom_thread_pool import ThreadPool


def show(arg):
    import time
    time.sleep(1)
    print(arg)


pool = ThreadPool(5, 'test-sub-')

for i in range(20):
    pool.callInThread(show, i)

pool.start()
pool.stop()
